package com.zrrd.common.vo;

import com.zrrd.entity.Rule;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author WanJl
 * @version 1.0
 * @title RuleVo
 * @description
 * @create 2024/9/11
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RuleVo extends Rule {
    private Integer level;

    public void setLevel() {
        Integer l=-1;
        if (getMenu()==1&&getRuleId()==0){
            l=0;
        }else if (getMenu()==0&&getRuleId()!=0){
            l=1;
        }else if (getMenu()==1&&getRuleId()!=0){
            l=2;
        }
    }

}
